import React from 'react';
import  {createBrowserRouter } from 'react-router-dom';
import Login from '../pages/login/index.jsx';
import NewCar from '../pages/newCar/index.jsx';
import Rank from '../pages/rank/index.jsx';

const BasicRouter = createBrowserRouter([
    {
        path: '/',
        element: <div> this is react18 home</div>,
    },
    {
        path: '/login',
        element: <Login />,
    },
    {
        path: '/newCar',
        element: <NewCar />,
    },
    {
        path: '/rank',
        element: <Rank />,
    }
])

// const BasicMapRouter =() =>{
//     return(
//         <HashRouter>
//             <Routes>
//                 <Route path="/loign" exact component={Login} />
//                 <Route path="/newCar" component={NewCar} />
//                 <Route path="/rank" component={Rank} />
//             </Routes>
//         </HashRouter>
//     )
// }

export default BasicRouter;